/*
 * Wantmore - Service Delivery Platform.
 *
 * $Id: PhotoAlbumsService.java 53 2010-10-11 12:13:05Z alexey.batyuta@gmail.com $
 *
 * Copyright 2010 by Sunbay Software Crimea Ltd.
 * All rights reserved
 */
package ua.crimea.bat.ss.services;

import org.springframework.dao.DataAccessException;
import ua.crimea.bat.ss.model.beans.Album;
import ua.crimea.bat.ss.model.beans.Image;

import javax.servlet.ServletOutputStream;
import java.io.IOException;
import java.util.Collection;
import java.util.List;

/**
 * User: bat
 * Date: Mar 26, 2010
 * Time: 8:00:27 AM
 */
public interface PhotoAlbumsService {
    Collection<Album> findAlbums(Boolean isPublic) throws DataAccessException;

    Album loadAlbum(Integer id) throws DataAccessException;

    Image loadImage(Integer id) throws DataAccessException;

    void storeAlbum(Album album) throws DataAccessException;

    void storeImage(Image image) throws DataAccessException;

    void deleteAlbum(Integer id) throws DataAccessException;

    void deleteImage(Integer id) throws DataAccessException;

    void streamImage(Integer id, ServletOutputStream outputStream, List<Image> images) throws IOException;

    void streamThumb(Integer id, ServletOutputStream outputStream) throws IOException;
}
